<template>
  <div>
    <CloudButton type="primary" @click="showDrawer"> Open </CloudButton>
    <CloudDrawer
      title="Basic Drawer"
      placement="right"
      :closable="false"
      :visible="visible"
      :after-visible-change="afterVisibleChange"
      @close="onClose"
    >
      <p>Some contents...</p>
      <p>Some contents...</p>
      <p>Some contents...</p>
    </CloudDrawer>
  </div>
</template>

<script>
  export default {
    title: '1.基础用法。',
    subTitle: '基础抽屉，点击触发按钮抽屉从右滑出，点击遮罩区关闭',
    data () {
      return {
        visible: false,
      }
    },
    methods: {
      afterVisibleChange (val) {
        console.log('visible', val);
      },
      showDrawer () {
        this.visible = true;
      },
      onClose () {
        this.visible = false;
      },
    }
  }
</script>

<style lang="scss">
</style>